function SOR(A,y,omega)
    len = length(A);
    B = zeros(len,len+1);
    for i = 1:len
        for j = 1:len
            if i == j
                B(i,j) = 0;
            else
                B(i,j) = -A(i,j)/A(i,i);
            end
        end
        B(i,len+1) = y(i)/A(i,i);
    end
    X = zeros(1,len);
    Y = [];
    for i = 2:100
        for j = 1:len
            X(j) = (1-omega)*X(j) + omega*(sum(X.*B(j,1:len)) + B(j,len+1));
        end
        Y = vertcat(Y,X);
    end
    Y
end